# 导包
from api.order import OrderAPI
import pytest
from common.read_json import read_json_file


# 创建测试类
class TestOrderAPI:
    # 初始化
    order_id = None

    # 前置处理
    def setup(self):
        self.order_api = OrderAPI()

    # 创建订单
    @pytest.mark.parametrize("aaa", read_json_file())
    def test_add_order(self, aaa):
        # print(aaa)
        response = self.order_api.add_order(aaa)
        print(response.json())
